<?php

namespace app\controller;

use app\service\EntityService;
use app\service\NoteEntityRelationService;
use support\Request;
use support\Response;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;

class NoteEntityRelationController
{


    /**
     * @var EntityService
     */
    private $noteEntityRelationService;

    public function __construct()
    {
        $this->noteEntityRelationService = NoteEntityRelationService::getInstance();
    }


    /**
     * 获取资产关联的镜头列表
     * @param Request $request
     * @return Response
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function getAssetFeedbackAffectedShotCount(Request $request): Response
    {
        $param = $request->post();
        $reviewFeedbackId = $param['review_feedback_id'];
        $res = $this->noteEntityRelationService->getAssetFeedbackAffectedShotCount($reviewFeedbackId);
        return json(success_response('', $res));
    }


}
